package com.stlm2.dems.entity;

/**
 * Author：fuchunyu
 * Date：2017/10/11
 * Description：
 */
public enum OAuthType {
    QQ(1) {
        public String toString() {
            return "qq";
        }
    },
    WX(2) {
        public String toString() {
            return "wx";
        }
    };

    private final int val;

    OAuthType(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static OAuthType getByIntValue(int n) {
        switch (n) {
            case 1:
                return QQ;
            case 2:
                return WX;
            default:
                return null;
        }
    }
}
